Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

337
Views
Error @signUp: [TypeError: undefined no es un objeto (evaluando 'firebase.createUser')]

Estoy tratando de implementar mi pantalla de registro aquí está el identificador de registro que se está llamando, las llamadas de la página de registro y pasar el valor a mi página de contexto.

 const handleSignup = async () => { setLoading(true) const user = { fullname, email, password, profilePhoto}; try { const createdUser = await firebase.createUser(user) setUser({ ...createdUser, isLoggedIn: true }); } catch (error) { console.log("Error @signUp: ", error); } finally { setLoading(false) } };

la página firebaseContext luego toma el valor que se ha pasado para crear la cuenta

 const FirebaseContext = createContext(); if(!firebase.apps.length){ firebase.initializeApp(auth); } const db = firebase.firestore(); const Firebase = { getCurrentUser: () => { return firebase.auth().currentUser }, createUser: async (user) => { try{ await firebase.auth().createUserWithEmailAndPassword(user.email, user.password); const uid = Firebase.getCurrentUser().uid; let profilePhotoUrl = "default"; await db.collection("users").doc(uid).set({ fullname: user.fullname, email: user.email, profilePhotoUrl }) if(user.profilePhoto){ profilePhotoUrl = await Firebase.uploadProfilePhoto(user.profilePhoto); } delete user.password; return { ...user, profilePhotoUrl, uid}; }catch(error){ console.log("Error @createUser", error.message); } },

Exportando el archivo

 import { FirebaseContext, FirebaseProvider, Firebase } from './FirebaseContext'; import { UserContext, UserProvider } from './UserContext'; export { FirebaseContext, Firebase, FirebaseProvider, UserContext, UserProvider };

Importando el archivo

 import { FirebaseContext } from "../context";
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!